<?php if ($this->isajax): ?>
<?php X\Msg::Failure($this->message); ?>
<?php else: ?>

        <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
            <head>
        <?php
        echo $this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8');

        echo $this->headLink()->appendStylesheet('/ext-3.4.0/resources/css/ext-all.css')
                ->appendStylesheet('/css/layout.css');

        echo $this->headScript()->appendFile('/ext-3.4.0/adapter/ext/ext-base.js')
                ->appendFile('/ext-3.4.0/ext-all.js')
                ->appendFile('/js/global_layout.js')
                ->appendFile('/js/x.js');
        ?>
        <!--   </style>-->
    </head>
    <body>
        <table class="layout">
            <tr><td id="layout_header"></td></tr>
            <tr><td id="layout_menu"></td></tr>
            <tr><td id="layout_content">

                    <script type="text/javascript">
//
//                        X.form.label({
//                            renderTo:'layout_content',html:'<p style="padding-bottom:10px;font-family:verdana;font-size:20px;font-weight:bold;">Ha ocurrido un error</p>'
//                        });
                        Ext.onReady(function(){
                        
                            X.form.panel({
                                renderTo:'layout_content',
                                title:'Error',
                                id:'errorForm',
                                width:400,
                                height:300,
                                collapsible:false,
                                collapsed:false,
                                items:[
                                    X.form.label({
                                        x:20,y:60,html:'<p style="width:350;font-size:12px;font-weight:bold;"><?php echo $this->message; ?></p>'
                                    }),
                                    X.form.button({
                                        id:'btn',
                                        style:'margin:auto;padding-top:20px',
                                        //renderTo:'layout_content',
                                        x:135,y:110,width:150,text:'Volver a la página inicial'
                                    })
                                ]
                            });
                            

                            X.event.button('btn', function(){
                                window.location='/';
                            });
                            X.win.panel({
                                id       : 'listWindow',
                                //title    : 'Carga de horario',
                                modal    : false,
                                border: false,
                                items    : X.get('errorForm')
                            });
                            X.get('listWindow').show();
                        });
                    </script>

                </td></tr>
            <tr><td id="layout_footer"></td></tr>
        </table>
    </body>
</html>

<?php endif; ?>
